#pragma once
#pragma warning ( disable : 4244)

#include<vector>
using std::vector;

class PerlinNoise {

public:
	PerlinNoise();
	PerlinNoise(float per, float freq, float oct);
	~PerlinNoise();
	float perlNoise1D(float x,bool mult);
	float perlNoise2D(float x,float y, bool mult);
	//testvector
	//vector<vector<int> > heightMap;

private:

	float rand1D(int x);
	float rand2D(int x, int y);
	float linearInterpolate(float a, float b, float x);
	float cosineInterpolate(float a, float b, float x);
	float smoothNoise1D(float x);
	float smoothNoise2D(float x, float y);
	float interpolatedNoise1D(float x);
	float interpolatedNoise2D(float x, float y);
	int testVar;
	float persistence, frequency, octaves;
	int octaveNo;

};